<?php
// $username=$_POST["username"];
// $password=$_POST["password"];
$json = file_get_contents("php://input");
$loginData = json_decode($json,false);


function checkLogin($user,$pswd){
    return $pswd==="1";
}

if(checkLogin($loginData->USERNAME,$loginData->PASSWORD)){
    $ret = [
        "sussess"=>true,
        "userId"=>$loginData->username,
        "userName"=>$loginData->username,
        "face"=>"images/".$loginData->username.".jpg"
    ];
    die(json_encode($ret));
}else {
    $ret = ["error"=>"用户名密码错误"];
    die(json_encode($ret));
}
$ret =[];
